<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>我的订单</title>
		<link rel="stylesheet" type="text/css" href="../static/css/public.css" />
		<link rel="stylesheet" type="text/css" href="../static/lib/layui/css/layui.css" />
		<script src="../static/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="../static/js/public.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="layui-container">
			<div class="order-page">
				<h2>我的订单</h2>
				<hr/>
				<table class="layui-hide" id="order_tb" lay-filter="order_tb"></table>
				<fieldset class="layui-elem-field layui-field-title" style="margin-top: 40px;">
				  <legend style="text-align: center;">订单明细</legend>
				  <div class="layui-field-box" id="order-items"></div>
				</fieldset>
				<script type="text/html" id="order_tb_bar">
				  <a class="layui-btn layui-btn-xs" lay-event="detail">查看</a>
				  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="cancel">取消订单</a>
				</script>
			</div>
		</div>
	</body>

	<link rel="stylesheet" type="text/css" href="../static/css/user_orders.css"/>
	<script src="../static/js/user_orders.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/html" id="order-item-tpl">
		{{# layui.each(d,function(index,item){   }}
			<div class="order-item-box">
				<div class="order-item">
					<a href="/xxx/{{item.bookId}}"><img src="../static/images/book_images/{{item.book_info.image}}" alt="{{item.book_info.bookName}}"/></a>
					<div class="order-item-info">
						<p><a href="/xxx/{{item.bookId}}">{{item.book_info.bookName}}</a></p>
						<p>{{item.book_info.author}}&nbsp;/&nbsp;{{item.book_info.pubDate}}&nbsp;/&nbsp;{{item.book_info.press}}</p>
						<p>¥&nbsp;{{item.price}}&nbsp;&nbsp;<del><em>¥&nbsp;{{item.book_info.price}}</em></del></p>
					</div>
					<div class="order-item-total">
						<p>购买数量：{{item.quantity}}</p>
						<p>合计：¥<span>{{ calculate(item.price,item.quantity) }}</span></p>
					</div>
				</div>
			</div>
		{{#   }); }}
	</script>
</html>
